package com.fs.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select * from user where username=#{username}")
    User findByUsername(String username);

    @Update("update user_token set token='123abc' ,updated=now() where user_id=#{id}")
    void deleteToken(Integer id);
}
